﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="Jy123.Web.Manage.User.Gift.Add" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="../../css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery.js" type="text/javascript"></script>

    <script src="../../js/jquery.ui.js" type="text/javascript"></script>

    <script src="../../js/main.js" type="text/javascript"></script>

    <title>礼物添加</title>
    <script type="text/javascript" language="javascript">
        $(function(){
            $("input[type=file]").change(function(){
                $("#giftImg").attr("src",this.value) 
            }),
            $("#priceLevel").slider({range: "min",value:1,min: 1,max: 50000,
			slide: function(event, ui) {
				$("#price").val( ui.value);
			}
		    })
        })
    </script>
    <style type="text/css">
        #giftImg{width:64px;height:64px; border:3px solid #CECABC; padding:2px; margin-bottom: 15px;}
    </style>
</head>
<body>
    <h4>
        <a href="#"><span>礼物添加</span></a></h4>
    <form id="form1" runat="server">
    <div class="register">
        <ul>
            <li class="w85r b">礼物名称 </li>
            <li>
                <asp:TextBox ID="gName" runat="server" MaxLength="50" CssClass="text"></asp:TextBox></li>
            <li>
                <asp:RequiredFieldValidator ID="RequireName" runat="server" ControlToValidate="gName"
                    Display="Dynamic" ErrorMessage="此项不能为空" CssClass="warning" ForeColor=""></asp:RequiredFieldValidator>
            </li>
        </ul>
        <ul>
            <li class="w85r b">图片地址 </li>
            <li>
                <asp:FileUpload ID="fpicture" runat="Server" CssClass="text" />
            </li>
            <li>
                <img id="giftImg" src="<%=hidPic.Value %>" alt="礼物图片" />
            </li>
        </ul>
        <ul>
            <li class="w85r b">需要金钱 </li>
            <li>
                <asp:TextBox ID="price" runat="server" Text="0" MaxLength="50" CssClass="text"></asp:TextBox>
            </li>
            <li>
                <div id="priceLevel" class="slider">
                    <ul>
                    </ul>
                </div>
            </li>
            <li>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="price"
                    Display="Dynamic" ErrorMessage="此项不能为空" CssClass="warning" ForeColor=""></asp:RequiredFieldValidator>
            </li>
        </ul>
        <ul>
            <li class="w85r b">礼物介绍 </li>
            <li>
                <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" Height="50px" Width="300px"
                    MaxLength="200" CssClass="text"></asp:TextBox>
            </li>
            <li>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtContent"
                    Display="Dynamic" ErrorMessage="此项不能为空" CssClass="warning" ForeColor=""></asp:RequiredFieldValidator>
            </li>
        </ul>
        <ul id="Tr_City">
            <li class="w85r b">分类 </li>
            <li>
                <asp:DropDownList ID="ddlClass" runat="server" OnSelectedIndexChanged="ddlClass_SelectedIndexChanged">
                </asp:DropDownList>
            </li>
            <li>
                <asp:RequiredFieldValidator ID="ddlClass1" runat="server" ControlToValidate="ddlClass"
                    Display="Dynamic" ErrorMessage="此项不能为空" CssClass="warning" ForeColor=""></asp:RequiredFieldValidator>
            </li>
        </ul>
        <ul class="bb">
            <li class="w85r"></li>
            <li>
                <asp:Button ID="btnSave" runat="server" Text=" 保 存 " CssClass="button" OnClick="btnSave_Click" />
                <asp:HiddenField ID="hidPic" runat="server" />
            </li>
        </ul>
    </div>
    </form>
</body>
</html>
